COPYCRYPT32.DLL =============== The purpose of this small 32-bit DLL is to do FAST encryption/decryption of very large files. (Databases for example) Its intended use is for applications that use encrypted files from CDROM (installations for example) Because it is a DLL that uses LPSTR (PChar) parameters, it can be used by any windows application/programming language that can call a Windows API. There are only 2 functions: EncodeSingle ============ PASCAL DECLARATION procedure EncodeSingle(lp_InFilePath,lp_OutFilePath,lp_Phrase:PChar); external 'COPYCRYPT32.DLL' Index 1; C DECLARATION VOID EncodeSingle( LPTSTR lp_InfilePath // address of full path of source file LPTSTR lp_OutFilePath // address of full path of destination file LPTSTR lp_Phrase // address of password phrase ); VISUAL BASIC DECLARATION Declare Sub EncodeSingle Lib 'COPYCRYPT32.DLL' (ByVal lp_InfilePath as String, ByVal lp_OutfilePath as String, ByVal lp_Phrase as String) DecodeSingle ============ PASCAL DECLARATION Function DecodeSingle(lp_InFilePath,lp_OutFilePath,lp_Phrase:PChar):Integer; external 'COPYCRYPT32.DLL' Index 1; C DECLARATION UINT DecodeSingle( LPTSTR lp_InfilePath // address of full path of source file LPTSTR lp_OutFilePath // address of path for decrypted file to be copied to LPTSTR lp_Phrase // address of password phrase ); VISUAL BASIC DECLARATION Declare Function DecodeSingle Lib 'COPYCRYPT32.DLL' (ByVal lp_InfilePath as String, ByVal lp_OutfilePath as String, ByVal lp_Phrase as String) As Integer Return Values are: Zero = Successful Decode. 2 = Password does not match 1 = Other error - messagebox will advise. NOTES ON USE ============ 1) EncodeSingle The source file is not deleted by the DLL. This allows CDROM installers to function. The original filename is stored internally in the encoded file, so the lpOutFileName can be named anything you like. The password phrase is NOT case sensitive. There is no limit to the length of the password phrase The file is read into RAM and encoded there before being written to disk. Multi-megabyte files encode quickly. The encoded file is the same size as the original file. 2) DecodeSingle lp_OutFilePath should be a directory. Network paths are fine. If lp_OutFilePath specifies a filename, it is ignored. The original filename is always used, as it is stored internally. The lp_InFilePath is not deleted by the DLL. This allows CDROM installers to function. The password phrase is NOT case sensitive. The file is read into RAM and decoded there before being written to disk. Multi-megabyte files decode quickly. DISTRIBUTION ============ The DLL and source code are copyright. The author (Gordon Bamber) can be contacted at: gbamber@mistral.co.uk The code is uncrippled and free for personal use. Commercial users MUST contact the author before distributing the DLL. The usual fee is a full copy of the accompanaying software/CDROM. Source code is only available for money. Contact the author for details.